using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
#if UNITY_EDITOR
using UnityEditor;
#endif


public class ExistConfirmPanel : MonoBehaviour
{
    public Button m_BtnConfirm;
    public Button m_BtnCancel;

    public void Show()
    {
        gameObject.SetActive(true);
    }

    public void Hide()
    {
        gameObject.SetActive(false);
    }

    //=========================================公私分界线==================================================

    void Awake()
    {
        gameObject.SetActive(false);
        m_BtnConfirm.onClick.AddListener(OnBtnConfirmClick);
        m_BtnCancel.onClick.AddListener(OnBtnCancelClick);
    }

    void OnBtnConfirmClick()
    {
#if UNITY_EDITOR
        EditorApplication.isPlaying = false;
#else
        Application.Quit();
#endif
    }

    void OnBtnCancelClick()
    {
        gameObject.SetActive(false);
    }
}

